package com.jiwei.community.constants;

/**
 *
 * 功能：定义系统所用常量，如求助的各种状态
 */
public class SystemConstant {
    /**
     * 顶级目录的父id
     */
    public static final Long TOP_MENU_PARENT_ID = 0L;
    /**
     * 管理员类型用户
     */
    public static final Integer USER_TYPE_ADMIN = 1;
    /**
     * 浏览量更新
     */
    public static final  String HELP_VIEW_COUNT = "help:viewCount";
    public static final String WEB_SOCKET_URI = "/ws";
    public static final String WEB_SOCKET_TOKEN_HEADER = "Sec-WebSocket-Protocol";
    public static final String WEB_SOCKET_DATA_TYPE_AUTH = "0";
    public static final String WEB_SOCKET_DATA_TYPE_MESSAGE = "1";

    /**
     * 推荐算法评分系数
     */
    public static final Double RECOMMEND_SCORE_FACTOR_LIKE = 1.4;
    public static final Double RECOMMEND_SCORE_FACTOR_COLLECT = 1.8;
    public static final Double RECOMMEND_SCORE_FACTOR_VIEW = 0.5;
    public static final Double RECOMMEND_SCORE_FACTOR_COMMENT = 0.8;
    public static final Double RECOMMEND_SIMILARITY_FACTOR_SCORE = 1.0;
    public static final Double RECOMMEND_SIMILARITY_COMMUNITY_FACTOR = 0.1;
    public static final Integer RECOMMEND_TOP_K = 10;
    public static final int RECOMMEND_SCORE_UPDATE_TYPE_VIEW = 0;
    public static final int RECOMMEND_SCORE_UPDATE_TYPE_COMMENT = 1;
    public static final int RECOMMEND_SCORE_UPDATE_TYPE_LIKE = 2;
    public static final int RECOMMEND_SCORE_UPDATE_TYPE_COLLECT = 3;


    /**
     * redis键值前缀
     */
    public static final String REDIS_PREFIX_RECOMMEND_SCORE = "recommend:score:";
    public static final String REDIS_PREFIX_RECOMMEND_SIMILARITY = "recommend:similarity:";
    public static final String REDIS_PREFIX_COMMUNITY_JOIN_NUM = "community:join-num";
    public static final String REDIS_PREFIX_COMMUNITY_POST_NUM = "community:post-num";
    public static final String REDIS_PREFIX_POST_COLLECT_NUM = "post:collect-num";
    public static final String REDIS_PREFIX_POST_LIKED_NUM = "post:liked-num";
    public static final String REDIS_PREFIX_POST_VIEW_NUM = "post:view-num";
    public static final String REDIS_PREFIX_POST_COMMENT_NUM = "post:comment-num";
    /**
     * 等级经验递增基值
     */
    public static final Long MAX_EXP_INCREASE_BASE_VAL = 500L;
    /**
     * 经验递增系数
     */
    public static final int MAX_EXP_INCREASE_FACTOR = 1;
    /**
     * 类型常量
     */
    public static final int COMMENT_TYPE_POST = 0;
    public static final int COMMENT_TYPE_DYNAMIC = 1;
    public static final int SIGN_IN_REWARD_TYPE_EXP = 0;
    public static final int SIGN_IN_REWARD_TYPE_INTEGRAL = 1;

    /**
     * 举报状态
     */
    public static final int REPORT_STATUS_NEED_VERIFY = 0;
    public static final int REPORT_STATUS_SUCCESS = 1;
    public static final int REPORT_STATUS_FAILED = 2;
}
